package com.imooc.springboot.study.runner;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * 开机启动的功能
 * 写一个类 实现一个接口  注入到容器
 */
@Slf4j
@Order(2)
@Component //spring 中的一个bean
public class BootApplicationRunner implements ApplicationRunner {
    @Override
    public void run(ApplicationArguments args) throws Exception {
        log.info("this is BootApplicationRunner");
    }
}
